package org.csmzxy.class2333;

public class MaxValue {
    public static void main(String[] args) {
        int[] arr = {1, 13, 2, 3, 8};
        int max = arr[0];
        int position = 0;
        for (int i = 0; i < arr.length; i++) {
            if (arr[i] > max) {
                max = arr[i];
                position = i;
            }
        }
        System.out.println("数组中的最大值是: " + max);
        System.out.println("该值在数组中的位置是: 第" + (position + 1) + "个位置");
    }
}